/**
 * May 14, 2014 10:14:37 AM
 */
package elitech.vietnam.copyweatherfashion.entities;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import com.google.gson.annotations.SerializedName;

/**
 * @author Cong
 *
 */
public class Comment {

	@SerializedName("id")
	public int Id;
	
	@SerializedName("id_mem")
	public int MemberId;
	
	@SerializedName("id_post")
	public int PostId;
	
	@SerializedName("cm_id")
	public String CMID;
	
	@SerializedName("cm_content")
	public String Content;
	
	@SerializedName("date")
	public String Date;
	
	@SerializedName("status")
	public int Status;
	
	@SerializedName("mem_id")
	public String MemId;
	
	@SerializedName("mem_name")
	public String Name;
	
	@SerializedName("mem_pic")
	public String Image;
	
	public Date Date() {
		try {
			return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()).parse(Date);
		} catch (ParseException e) {
			return null;
		}
	}
}
